package com.cszy.yydqbfq.ext

import android.app.Fragment
import android.content.Context
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat


fun Context.getColors(@ColorRes id: Int) = ContextCompat.getColor(this, id)

fun Fragment.getColors(@ColorRes id: Int) = ContextCompat.getColor(context!!, id)

fun Context.getDrawables(@DrawableRes id: Int) = ContextCompat.getDrawable(this, id)